package com.example.hzly.entity;

import javax.persistence.*;
import lombok.Data;
import com.baomidou.mybatisplus.annotation.*;

import java.util.List;

@Data
@Entity
@Table(name = "user")
@TableName("user")
public class User {
    @Id
    @TableId(type = IdType.AUTO)
    private Long id;
    private String name;
    private String avatar;
    private String username;
    private String password;
    @OneToMany(mappedBy = "userId", fetch = FetchType.LAZY)
    @TableField(exist = false)
    private List<StoryComment> comments;
}